package com.cib.process.bean;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement(name = "service")
public class EsbRequestServer {
    private Head head;
    private ChatBody body;

    public Head getHead() {
        return head;
    }

    @XmlElement(name = "Head")
    public void setHead(Head head) {
        this.head = head;
    }

    public ChatBody getBody() {
        return body;
    }

    @XmlElement(name = "Body")
    public void setBody(ChatBody body) {
        this.body = body;
    }

    @Override
    public String toString() {
        return "EsbRequestServer{" +
                "head=" + head +
                ", body=" + body +
                '}';
    }



    @XmlRootElement(name = "Head")
    public static class Head{
        private String svcCd;
        private String svcScn;


        public String getSvcCd() {
            return svcCd;
        }

        @XmlElement(name = "SvcCd",required=false)
        public void setSvcCd(String svcCd) {
            this.svcCd = svcCd;
        }

        public String getSvcScn() {
            return svcScn;
        }
        @XmlElement(name = "SvcScn",required=false)
        public void setSvcScn(String svcScn) {
            this.svcScn = svcScn;
        }

        @Override
        public String toString() {
            return "Head{" +
                    "svcCd='" + svcCd + '\'' +
                    ", svcScn='" + svcScn + '\'' +
                    '}';
        }
    }

    @XmlRootElement(name = "Body")
    public static class ChatBody{
        private String sessionId;
//        会话数据
        private String sessionIdData;
        private String lastAction;
//        上一次的结果
        private String lastResult;
        private String token;

        public String getToken() {
            return token;
        }

        @XmlElement(name = "SysTknCdl")
        public void setToken(String token) {
            this.token = token;
        }

        public String getSessionId() {
            return sessionId;
        }

        @XmlElement(name = "CnvrstnNo1",required = false)
        public void setSessionId(String sessionId) {
            this.sessionId = sessionId;
        }

        public String getSessionIdData() {
            return sessionIdData;
        }

        @XmlElement(name = "NewsCntnt",required = false)
        public void setSessionIdData(String sessionIdData) {
            this.sessionIdData = sessionIdData;
        }

        public String getLastAction() {
            return lastAction;
        }

        @XmlElement(name = "InsrNo",required = false)
        public void setLastAction(String lastAction) {
            this.lastAction = lastAction;
        }

        public String getLastResult() {
            return lastResult;
        }

        @XmlElement(name = "DataRslt",required = false)
        public void setLastResult(String lastResult) {
            this.lastResult = lastResult;
        }

        @Override
        public String toString() {
            return "ChatBody{" +
                    "sessionId='" + sessionId + '\'' +
                    ", sessionIdData='" + sessionIdData + '\'' +
                    ", lastAction='" + lastAction + '\'' +
                    ", lastResult='" + lastResult + '\'' +
                    ", token='" + token + '\'' +
                    '}';
        }
    }
}
